<template>
  <div class="layout-box">
    <div :class="['menu-box', isCollapse && 'no-more-width']">
      <navMenu></navMenu>
    </div>
    <div class="view-box">
      <router-view></router-view>
    </div>
  </div>
</template>

<script>
import { mapState } from 'vuex';
export default {
  name: 'pages',
  components: {
    navMenu: () => import('./comp/navMenu')
  },
  data() {
    return {};
  },
  computed: {
    ...mapState('pageModule', ['isCollapse'])
  },
  methods: {}
};
</script>

<style lang="scss" scoped>
.layout-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  .menu-box {
    width: 205px;
    height: 100%;
    box-sizing: border-box;
    border-right: 1px solid #ddd;
    &.no-more-width {
      width: unset;
    }
  }
  .view-box {
    flex: 1;
    height: 100%;
    overflow: auto;
  }
}
</style>
